package com.cykj.service;

import com.cykj.bean.Tblroomuser;
import com.cykj.mapper.GameHallMapper;
import com.cykj.mapper.GameMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GameServiceImpl implements GameService{
    @Autowired
    private GameHallMapper gameHallMapper;
    @Autowired
    private GameMapper gameMapper;
    @Override
    public List<Tblroomuser> selectroom(int roomid) {
        return gameMapper.selectroom(roomid);
    }

    @Override
    public List<Tblroomuser> selectuser(int userid) {
        return gameMapper.selectuser(userid);
    }

    @Override
    public int updreldy(int userid) {
        return gameMapper.updreldy(userid);
    }

    @Override
    public int updcancel(int userid) {
        return gameMapper.updcancel(userid);
    }

    @Override
    public List<Tblroomuser> selectout(int userid) {
        return gameMapper.selectout(userid);
    }

    @Override
    public int getout(int userid) {
        return gameMapper.getout(userid);
    }

    @Override
    public int roomowner(int roomid) {
        return gameMapper.roomowner(roomid);
    }

    @Override
    public int countRoomUser(int rid) {
        return gameHallMapper.countRoomUser(rid);
    }
}
